<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "yii_addon_customer".
 *
 * @property int $id ID
 * @property int $merchant_id 企业
 * @property int $member_id 用户
 * @property int $cate_id 分类
 * @property string $serial 编号
 * @property string $realname 姓名
 * @property string $mobile 手机
 * @property string $mail 邮箱
 * @property string $covers 图片
 * @property int $status 状态
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 */
class Customer extends \common\models\base\BaseModel
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'yii_addon_customer';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['merchant_id', 'member_id', 'cate_id', 'status', 'created_at', 'updated_at'], 'integer'],
            [['cate_id', 'serial', 'realname', 'created_at', 'updated_at'], 'required'],
            [['covers'], 'string'],
            [['serial', 'mobile', 'mail'], 'string', 'max' => 32],
            [['realname'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'merchant_id' => '企业',
            'member_id' => '用户',
            'cate_id' => '分类',
            'serial' => '编号',
            'realname' => '姓名',
            'mobile' => '手机',
            'mail' => '邮箱',
            'covers' => '图片',
            'status' => '状态',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }
}
